package com.xnyzc.lhy.common.penum.banner;

import com.xnyzc.lhy.common.entity.PEnum;

/**
 * banner图 信息
 *
 * @Author: haoyfa
 * @Date: 2019-12-17
 */
public enum BannerErrorCode implements PEnum<Integer> {
    //成功标志
    success(0, "success"),
    unKnow(403, "未知错误"),
    paramEmptyError(10000, "参数不能为空"),
    bannerNoneError(20000, "参数不能为空");

    int value;
    String desc;

    BannerErrorCode(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    @Override
    public String toString() {
        return name();
    }

    @Override
    public String toChString() {
        return desc;
    }

    public String toMessage() {
        String errorMessage = this.value + "," + this.desc;
        return errorMessage;
    }
}
